<template>
  <h3>Suspence 组件</h3>
  <Suspense>
    <template #default>
      <!-- 异步组件 -->
  <AsyncSuspense/>  
    </template>
    <template v-slot:fallback>
      <!-- 准备的内容 -->
      <h4>Loading</h4>
    </template>
  </Suspense>
</template>
<script lang='ts'>
  import { defineComponent,defineAsyncComponent} from 'vue';
  import AsyncSuspense from './AsyncSuspense.vue'
  // vue3的动态引入
  // const AsyncSuspense = defineAsyncComponent(()=>import('./AsyncSuspense.vue'))
  export default defineComponent({
    name:'SuspenceStu',
    components:{AsyncSuspense},
  })
</script>
<style scoped>
</style>